TickerAnalytics
METADATA
Attribute | Value |
---|---|
Topic | 3225-market-statistics |
MLink Token | EqtAnalytics |
Product | SRAnalytics |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
ticker_at | enum - AssetType | PRI | 'None' | |
ticker_ts | enum - TickerSrc | PRI | 'None' | |
ticker_tk | VARCHAR(12) | PRI | '' | |
tradingdate | DATE | PRI | '1900-01-01' | trading period |
securityID | INT | 0 | security ID is used to track a ticker over time It is a best effort attempt to track a ticker through name changes and other corporate actions | |
altID | INT | 0 | SR security ID is used to track a ticker over time It is a best effort attempt to track a ticker through name changes and other corporate actions | |
dayNumber | INT | 0 | cardinal day number increments by 1 each trading period | |
openprice | FLOAT | 0 | open print | |
highprice | FLOAT | 0 | highest regular hours print price | |
lowprice | FLOAT | 0 | lowest regular hours print price | |
closeprice | FLOAT | 0 | official exchange close as reported by primary exchange | |
prClose | FLOAT | 0 | adjusted prior period close closePr prior Close X returnFactor | |
prCloseUnadj | FLOAT | 0 | unadjusted prior period close | |
week52High | DOUBLE | 0 | 52 week high | |
week52HighDate | DATE | '1900-01-01' | 52 week high date | |
week52Low | DOUBLE | 0 | 52 week low | |
week52LowDate | DATE | '1900-01-01' | 52 week low date | |
avgVolume | FLOAT | 0 | trailing average 20D daily stock volume | |
ccvar | DOUBLE | 0 | closeclose log return daily variance using the adjusted yesterday closeLn CloseClosePr 2 | |
hlvar | DOUBLE | 0 | highlow daily variance | |
dayreturn | FLOAT | 0 | daily return adjusted for CorpAction | |
returnfactor | FLOAT | 0 | adjustment factor | |
cumreturnfactor | FLOAT | 0 | cumulative adjustment factor | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | record update timestamp |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
ticker_at | 2 |
ticker_ts | 3 |
tradingdate | 4 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRAnalytics`.`MsgTickerAnalytics` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`tradingdate` DATE NOT NULL DEFAULT '1900-01-01' COMMENT 'trading period',
`securityID` INT NOT NULL DEFAULT 0 COMMENT 'security ID is used to track a ticker over time. It is a best effort attempt to track a ticker through name changes and other corporate actions',
`altID` INT NOT NULL DEFAULT 0 COMMENT 'SR security ID is used to track a ticker over time. It is a best effort attempt to track a ticker through name changes and other corporate actions',
`dayNumber` INT NOT NULL DEFAULT 0 COMMENT 'cardinal day number (increments by 1 each trading period)',
`openprice` FLOAT NOT NULL DEFAULT 0 COMMENT 'open print',
`highprice` FLOAT NOT NULL DEFAULT 0 COMMENT 'highest regular hours print price',
`lowprice` FLOAT NOT NULL DEFAULT 0 COMMENT 'lowest regular hours print price',
`closeprice` FLOAT NOT NULL DEFAULT 0 COMMENT 'official exchange close (as reported by primary exchange)',
`prClose` FLOAT NOT NULL DEFAULT 0 COMMENT 'adjusted prior period close; closePr = prior Close X returnFactor',
`prCloseUnadj` FLOAT NOT NULL DEFAULT 0 COMMENT 'unadjusted prior period close',
`week52High` DOUBLE NOT NULL DEFAULT 0 COMMENT '52 week high',
`week52HighDate` DATE NOT NULL DEFAULT '1900-01-01' COMMENT '52 week high date',
`week52Low` DOUBLE NOT NULL DEFAULT 0 COMMENT '52 week low',
`week52LowDate` DATE NOT NULL DEFAULT '1900-01-01' COMMENT '52 week low date',
`avgVolume` FLOAT NOT NULL DEFAULT 0 COMMENT 'trailing average 20D daily stock volume',
`ccvar` DOUBLE NOT NULL DEFAULT 0 COMMENT 'close-close log return daily variance (using the adjusted yesterday close:Ln (Close/ClosePr) ^ 2',
`hlvar` DOUBLE NOT NULL DEFAULT 0 COMMENT 'high-low daily variance',
`dayreturn` FLOAT NOT NULL DEFAULT 0 COMMENT 'daily return (adjusted for CorpAction)',
`returnfactor` FLOAT NOT NULL DEFAULT 0 COMMENT 'adjustment factor',
`cumreturnfactor` FLOAT NOT NULL DEFAULT 0 COMMENT 'cumulative adjustment factor',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'record update timestamp',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`tradingdate`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`tradingdate`,
`securityID`,
`altID`,
`dayNumber`,
`openprice`,
`highprice`,
`lowprice`,
`closeprice`,
`prClose`,
`prCloseUnadj`,
`week52High`,
`week52HighDate`,
`week52Low`,
`week52LowDate`,
`avgVolume`,
`ccvar`,
`hlvar`,
`dayreturn`,
`returnfactor`,
`cumreturnfactor`,
`timestamp`
FROM `SRAnalytics`.`MsgTickerAnalytics`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a DATE */
`tradingdate` = '2022-01-01';
Doc Columns Query
SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='TickerAnalytics' ORDER BY ordinal_position ASC;